spatial PCA (sPCA, package = adegenet) analysis for population structure from geo-referenced (latitude/longitude) samples and genetic data. Most of these steps are taken from the tutorial for sPCA (available at https://github.com/thibautjombart/adegenet). The Monte Carlo test for global and local structure is based on Montano and Jombart 2018, but the original global and local tests from Jombart et al. 2008 are also included.

Data and stratification (including coordinates) are imported as separate files and combined into a gtypes object (package = strataG).

Example files: example_100_loci_genotable.csv Strata_example_Ppho.csv

References: T Jombart, S Devillard, A-B Dufour and D Pontier (2008), Revealing cryptic spatial patterns in genetic variability by a new multivariate method. Heredity 101:92-103.

V. Montano and T. Jombart (2017), An Eigenvalue test for spatial principal component analysis. BMC Bioinformatics 18:562 (DOI 10.1186/s12859-017-1988-y).

load packages

rm(list = ls())

library(adegenet)
library(strataG)
library(spdep)
library(tidyverse)
library(gtools)
library(PBSmapping)
library(maps)
library(ggplot2)
library(rworldmap)
library(swfscMisc)
library(fields)
library(RColorBrewer)
library(mapplots)
library(marmap)
library(raster)

paste("working directory is:")
getwd()

load and format data from csv files for genotypes and stratification schemes (for gtypes object used by strataG package), and remove monomorphic loci for specified strata.

stratum <- "Wcoast4_num" #corrected to reflect AK_STRATA_3 and Wcoast4_num (several samples removed compared to Num_AK3_WC4)
title <- "sPCA"
#dir.create(paste(title,"_",stratum, sep = ""))

# read genotypes data file (diploid, codominant); in directory above current directory
# Format = 1st column = labid, 2 columns per locus
gdata <- read.csv("example_100_loci_genotable.csv", header = TRUE) 
#sample id column = 'labid', missing data as NA, 00, 000, -999

# read stratification file (includes lat/lon coordinates)
# in directory above current directory
# required columns for labid, Latitude, Longitude. After that, each column is a stratification scheme with 
#  strata names for each sample in the strata.
coord <- read.csv("Strata_example_Ppho.csv", header = TRUE, na.strings=c("","NA"))
# change labid column header name
colnames(coord)[colnames(coord) == "LABID"] <- "labid"

# combine data with coordinates (files can be different lengths)
# select the specified stratum along with labid, Latitude and Longitude from the strata file
strata.df.names <- c("labid", "Latitude", "Longitude", stratum)
coord.strat <- coord[,colnames(coord) %in% strata.df.names]
# then merge dataframes based on "labid" being a column name in both dataframes
data <- merge(coord.strat,gdata)
# remove sample data if not included in the specified strata
data2 <- data %>% drop_na(stratum)
# remove sample data if it doesn't have lat/lon
data2 <- data2 %>% drop_na(Latitude)
# Remove monomorphic loci then ane write a file of monomorphic loci for this stratification scheme.
other<-data2 %>% dplyr::select(labid, Latitude, Longitude) #create dataframe to add Lat/Lon to gtypes object (labid, Latitude, Longitude)
g <- df2gtypes(data2, #this creates a df with 2 columns for id and hap
               ploidy = 2,
               id.col = 1,
               strata.col = 4,
               loc.col = 5,
               other = other,
               description = title)
alleleNum<-numAlleles(g)
not.mono <- names(alleleNum)[alleleNum > 1]
not.mono.g <- g[, not.mono, ]
not.mono.df <- as.data.frame(not.mono.g)
not.mono.df$labid<-not.mono.df$ids
not.mono.df$ids<-NULL
# Add the lat/lon data back to the dataframe
data3<-merge(not.mono.df,other)
# re-order the dataframe to put Lat/Lon columns after labid's
latlon <- c("labid", "Latitude", "Longitude")
data3 <- data3[, c(latlon, setdiff(names(data3), latlon))]
data3 <- data3 %>% arrange(strata, labid) # sort by strata column (ascending)

# save list of monomorphic loci to a .csv file
mono<-alleleNum < 2
monoloc<-names(mono) [which(mono==TRUE)]
write.csv(monoloc, paste0(stratum,"_monomorphic_loci.csv"))
cat("there were", length(monoloc), "monomorphic loci, saved to file:", paste0(stratum,"_monomorphic_loci.csv"))
## there were 0 monomorphic loci, saved to file: Wcoast4_num_monomorphic_loci.csv
#save summary of data (after excluding monomorphic loci)
data_sum <- summary(not.mono.g)
strata.df <- as.data.frame(data_sum$strata.smry)
loc.df <- as.data.frame(data_sum$locus.smry)
samp.df <- as.data.frame(data_sum$sample.smry)
write.csv(strata.df, paste0(title,"_",stratum,"_data_sum.csv"))
write.csv(loc.df, paste0(title,"_",stratum,"_loc_sum.csv"))
write.csv(samp.df, paste0(title,"_",stratum,"_sample_sum.csv"))

paste("number of individuals = ", data_sum$num.ind)
## [1] "number of individuals =  273"
paste("number of loci = ", data_sum$num.loc)
## [1] "number of loci =  100"
# set the modified data file as the default database in R search path
attach(data3) 

data3[1:10,1:10]
##    labid Latitude Longitude            strata Loc_10.1 Loc_10.2 Loc_101.1
## 1  11229 53.75000 -131.8333             23_BC        C        A         T
## 2   7028 53.33333 -132.8333             23_BC        C        C         T
## 3   7037 51.66667 -128.0000             23_BC        C        A         T
## 4   1060 49.05000 -125.7333 24_W_Vancouver_Is        C        C         T
## 5   1061 48.70000 -124.9500 24_W_Vancouver_Is        C        A         T
## 6   1080 49.05000 -125.7167 24_W_Vancouver_Is        A        A         T
## 7  11221 48.63333 -124.8333 24_W_Vancouver_Is        C        A         T
## 8  11222 48.63333 -124.8333 24_W_Vancouver_Is        C        A         T
## 9  11223 48.63333 -124.8333 24_W_Vancouver_Is        C        A         T
## 10 11224 48.63333 -124.8333 24_W_Vancouver_Is        C        C         T
##    Loc_101.2 Loc_102.1 Loc_102.2
## 1          T      ACCA      ACCA
## 2          C      ACCA      ACCA
## 3          C      ACCA      ACCA
## 4          T      ACCA      ACCA
## 5          C      ACCA      ACCA
## 6          T      ACCA      ACCA
## 7          C      ACCA      ACCA
## 8          T      ACCA      ACCA
## 9          C      ACCA      ACCA
## 10         T      ACCA      ACCA

Map the data points

Format data to genind object for adegenet (see tutorials at https://github.com/thibautjombart/adegenet)

# first convert gtypes to genind
genot <- data3[5:ncol(data3)]
dim(genot)
## [1] 273 200
loc<-ncol(genot) # counts the number of columns (alleles)

allele <- sapply(genot, levels)

#List of Alleles 1
Ai <- seq(1,loc-1,2); length(Ai)
## [1] 100
#List of Alleles 2
Aj <- seq(2,loc,2); length(Aj)
## [1] 100
# Nb loci
nloc <- length(Ai)

# Empty matrix
SNPdata <- matrix(ncol=length(genot)/2, nrow=nrow(genot))

# Loop to assamble A1 and A2 of each loci into combined alleles in single column
for (i in c(1:nloc)){
  #i=1
  SNP <- paste(genot[,Ai[i]], genot[,Aj[i]], sep="/")
  SNPdata[,i] <- SNP
}

# Note SNPdata have lost the loc.names. We can restore that as follow
my.colnames <- names(genot)[Ai]
my.new.colnames <- gsub(".1$","", names(genot)[Ai], perl=TRUE)
colnames(SNPdata) <- my.new.colnames #gsub(".1$","", names(genot)[Ai], perl=TRUE)
rownames(SNPdata) <- data3$labid
SNPdata1 <- cbind(labid = rownames(SNPdata), SNPdata)
SNPdata[c(1:10), (1:10)]
##       Loc_10 Loc_101 Loc_102     Loc_103 Loc_104     Loc_106 Loc_107  
## 11229 "C/A"  "T/T"   "ACCA/ACCA" "T/C"   "TCTT/TTCT" "C/C"   "ACG/GCG"
## 7028  "C/C"  "T/C"   "ACCA/ACCA" "C/C"   "TCTT/TCTT" "C/T"   "ACG/ACG"
## 7037  "C/A"  "T/C"   "ACCA/ACCA" "C/C"   "TCCT/TCTT" "C/C"   "ACG/GCG"
## 1060  "C/C"  "T/T"   "ACCA/ACCA" "C/C"   "TCCT/TCTT" "C/C"   "GCG/GCG"
## 1061  "C/A"  "T/C"   "ACCA/ACCA" "T/C"   "TCCT/TCCT" "C/T"   "AAG/ACG"
## 1080  "A/A"  "T/T"   "ACCA/ACCA" "C/C"   "TCCT/TCCT" "C/C"   "ACG/GCG"
## 11221 "C/A"  "T/C"   "ACCA/ACCA" "C/C"   "TCCT/TCTT" "C/T"   "GCG/GCG"
## 11222 "C/A"  "T/T"   "ACCA/ACCA" "C/C"   "TCCT/TCCT" "C/C"   "ACG/GCC"
## 11223 "C/A"  "T/C"   "ACCA/ACCA" "C/C"   "TCCT/TCTT" "C/T"   "ACG/GCG"
## 11224 "C/C"  "T/T"   "ACCA/ACCA" "C/C"   "TCCT/TCCT" "C/C"   "GCG/GCG"
##       Loc_109 Loc_110           Loc_111    
## 11229 "C/C"   "GATAATT/GGTAATT" "GGAA/GGAA"
## 7028  "C/A"   "NA/NA"           "GAAA/GAAA"
## 7037  "C/C"   "GATAATT/GATAATT" "GAAA/GGAA"
## 1060  "C/A"   "GATAATT/GATAATT" "GAAA/GAAA"
## 1061  "C/C"   "GAGAATT/GATAATT" "GAAA/GGAA"
## 1080  "C/A"   "GATAATT/GATAATT" "GGAA/GGAA"
## 11221 "C/C"   "GATAATT/GATCATT" "GGAA/GGAA"
## 11222 "C/C"   "GAGAATT/GATAATT" "GGAA/GGAA"
## 11223 "C/C"   "GATAATT/GATAATT" "GGAA/GGAA"
## 11224 "C/C"   "GAGAATT/GATAATT" "GGAA/GGAA"
obj<-df2genind(X=SNPdata, ind.names=data3$labid, pop=data3$strata, ploidy=2, sep="/", NA.char = "NA")
genind.summary <- summary(obj)
###obj$other$xy <-cbind(data3$Longitude,data3$Latitude) #for data that cross the international date line, change Longitude to Lon360 (and provide converted data column)

# pdf(file=paste0(title,"_",stratum,"_Sample_sizes.pdf"), width = 5, height = 5, paper = "letter", pointsize = 8)
obj$other$xy <-cbind(data3_Lon360$Lon360, data3_Lon360$Latitude)
is.genind(obj)
## [1] TRUE
obj
## /// GENIND OBJECT /////////
## 
##  // 273 individuals; 100 loci; 274 alleles; size: 385.3 Kb
## 
##  // Basic content
##    @tab:  273 x 274 matrix of allele counts
##    @loc.n.all: number of alleles per locus (range: 2-6)
##    @loc.fac: locus factor for the 274 columns of @tab
##    @all.names: list of allele names for each locus
##    @ploidy: ploidy of each individual  (range: 2-2)
##    @type:  codom
##    @call: df2genind(X = SNPdata, sep = "/", ind.names = data3$labid, pop = data3$strata, 
##     NA.char = "NA", ploidy = 2)
## 
##  // Optional content
##    @pop: population of each individual (group size range: 3-29)
##    @other: a list containing: xy
barplot(table(pop(obj)), col=funky(17), las=3,
ylab="Sample size", cex.names=0.4) # xlab="Population", 

# dev.off()

# create genpop object from genind:
genpop <- genind2genpop(obj)
## 
##  Converting data from a genind to a genpop object... 
## 
## ...done.

sPCA

obj.s<-obj
obj.s$other$xy<-jitter(obj$other$xy, factor = 1) # LL used amount = 100 for 100 meters on UTM coordinates in meters.

mySpca <- spca(obj.s, ask=T, type=1, scannf=F, nfposi = 3, nfnega = 0, scale=T) # method used by LL
## Warning in spca.genind(obj.s, ask = T, type = 1, scannf = F, nfposi = 3, :
## NAs in data are automatically replaced (to mean allele frequency)
## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

#mySpca <- spca(obj, type=5,d1=0,d2=2,scannf=FALSE, nfposi = 5, nfnega = 2) #, nfposi = 3, nfnega = 0
#mySpca <- spca(genpop, type=5,d1=0,d2=2,scannf=FALSE)
# computes a sPCA using a connection network which denes neighbouring entities based on pairwise geographic distances (type=5), considering as neighbours two entities whose distance between 0 (d1=0) and 2 (d2=2) (see tutorial-spca from adgenet github page)
# scannf=TRUE spca displays a barplot of eigenvalues and asks the user for a number of positive axes ('rst number of axes') and negative axes ('second number of axes') to be retained.

# pdf(file=paste0(title,"_",stratum,"_Eigen_values.pdf"))

#  sample2.map(data3_Lon360$Latitude, data3_Lon360$Lon360, lat.range, lon.range, n = n, 
#           bg = "black", col = "blue")
#  colorplot(mySpca, cex=2, axes=1:3, main="colorplot sPCA", add.plot=TRUE) # axes=1:ncol(x$li), 

barplot(mySpca$eig, main="sPCA eigenvalues",
col=spectral(length(mySpca$eig)))
legend("topright", fill=spectral(2),
leg=c("Global structures", "Local structures"))
abline(h=0,col="grey")

# Positive eigenvalues (on the left) correspond to global structures, while negative eigenvalues (on the right) indicate local patterns.
# dev.off()

spatial and variance components of the eigenvalues (tutorial p. 13-14) The resulting figure represents eigenvalues of sPCA (denoted lambda-i with i = 1,…,r, where lambda-1 is the highest positive eigenvalue, and lambda-r is the highest negative eigenvalue.

This figure is useful to assess whether a given score of entities contains relatively enough variability and spatial structuring to be interpreted. For instance, int the tutorial example, lambda-1 clearly is the largest eigenvalue in terms of variance and of spatial autocorrelation, and can be well distinguished from all the other eigenvalues. Hence, only the first global structure, associated to lambda-1, should be interpreted.

# pdf(file=paste0(title,"_",stratum,"_screeplot.pdf"))
screeplot(mySpca)
## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

# dev.off()

Global and local tests If the alternative hypothesis is “greater”, a p-value is estimated as: (number of random values equal to or greater than the observed one + 1)/(number of permutations + 1). The null hypothesis is rejected if the p-value is less than the significance level. If the alternative hypothesis is “less”, a p-value is estimated as: (number of random values equal to or less than the observed one + 1)/(number of permutations + 1). Again, the null hypothesis is rejected if the p-value is less than the significance level.

# Need to replace "NA"s in the genind data table with 0s.
obj.s@tab <- na.replace(obj.s@tab, 0, na.rm=TRUE)
#obj1 <- tab(obj, NA.method="mean") # this converts missing data (NA's) to the mean value for the population

myGtest <- global.rtest(obj.s$tab, mySpca$lw, nperm=999) # can start with 99 permutations to test
myGtest
## Monte-Carlo test
## Call: global.rtest(X = obj.s$tab, listw = mySpca$lw, nperm = 999)
## 
## Observation: 0.008209375 
## 
## Based on 999 replicates
## Simulated p-value: 0.006 
## Alternative hypothesis: greater 
## 
##      Std.Obs  Expectation     Variance 
## 3.684810e+00 5.816562e-03 4.216840e-07
a=paste0("observation = ",myGtest$obs)
b=paste0("alternative hypothesis = ",myGtest$alter)
c=paste0("based on ",myGtest$rep," replicates")
d=paste0("simulated pvalue = ",myGtest$pvalue)


# pdf(file=paste0(title,"_",stratum,"_Global_test.pdf"))
plot(myGtest, main="Global Structure ALL")

plot(NA, xlim=c(0,5), ylim=c(0,5), bty='n',
     xaxt='n', yaxt='n', xlab='', ylab='')
text(1,4,a, pos=4)
text(1,3,b, pos=4)
text(1,2,c, pos=4)
text(1,1,d, pos=4)
points(rep(1,4),1:4, pch=15)

myGtest
## Monte-Carlo test
## Call: global.rtest(X = obj.s$tab, listw = mySpca$lw, nperm = 999)
## 
## Observation: 0.008209375 
## 
## Based on 999 replicates
## Simulated p-value: 0.006 
## Alternative hypothesis: greater 
## 
##      Std.Obs  Expectation     Variance 
## 3.684810e+00 5.816562e-03 4.216840e-07
# dev.off()

# The figure shows an histogram of permuted test statistics and indicates the observed statistics by a black dot and a segment. in the example (tutorial-spca.pdf), the plot clearly shows that the oberved test statistic is larger than most simulated values, leading to a likely rejection of the null hypothesis of absence of spatial structure.```

local test

myLtest <- local.rtest(obj.s@tab,mySpca$lw, nperm = 999) #recommend 9999 permutations; test with 99
myLtest
## Monte-Carlo test
## Call: local.rtest(X = obj.s@tab, listw = mySpca$lw, nperm = 999)
## 
## Observation: 0.005899838 
## 
## Based on 999 replicates
## Simulated p-value: 0.485 
## Alternative hypothesis: greater 
## 
##       Std.Obs   Expectation      Variance 
## -1.683789e-01  6.007047e-03  4.054001e-07
a=paste0("observation = ",myLtest$obs)
b=paste0("alternative hypothesis = ",myLtest$alter)
c=paste0("based on ",myLtest$rep," replicates")
d=paste0("simulated pvalue = ",myLtest$pvalue)

# pdf(file=paste0(title,"_",stratum,"_Local_test.pdf"))
plot(myLtest, main="Local Structure ALL")

plot(NA, xlim=c(0,5), ylim=c(0,5), bty='n',
     xaxt='n', yaxt='n', xlab='', ylab='')
text(1,4,a, pos=4)
text(1,3,b, pos=4)
text(1,2,c, pos=4)
text(1,1,d, pos=4)
points(rep(1,4),1:4, pch=15)

myLtest
## Monte-Carlo test
## Call: local.rtest(X = obj.s@tab, listw = mySpca$lw, nperm = 999)
## 
## Observation: 0.005899838 
## 
## Based on 999 replicates
## Simulated p-value: 0.485 
## Alternative hypothesis: greater 
## 
##       Std.Obs   Expectation      Variance 
## -1.683789e-01  6.007047e-03  4.054001e-07
# dev.off()

Monte Carlo test for presence of significant spatial structure in sPCA Montano and Jombart BMC Bioinformatics (2017) 18:562, DOI 10.1186/s12859-017-1988-y (https://github.com/thibautjombart/adegenet/blob/master/R/spca_randtest.R) “Results show that our test outperforms the original global and local tests, exhibiting improved statistical power while retaining similar, and reliable type I errors. Moreover, by allowing to test various sets of axes, it can be used to guide the selection of retained sPCA components.”

# run spca_randtest function. test number of permuations at low num (e.g., 40), then run with ≥999.
randtest <- spca_randtest(mySpca, nperm = 999)
## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.
a=paste0("global observation = ",randtest$global$obs)
b=paste0("global alternative hypothesis = ",randtest$global$alter)
c=paste0("global based on ",randtest$global$rep," replicates")
d=paste0("global simulated pvalue = ",randtest$global$pvalue)
e=paste0("local observation = ",randtest$local$obs)
f=paste0("local alternative hypothesis = ",randtest$local$alter)
g=paste0("local based on ",randtest$local$rep," replicates")
h=paste0("local simulated pvalue = ",randtest$local$pvalue)


# pdf(file=paste0(title,"_",stratum,"_randtest.pdf"))
plot(randtest[[1]], main="Global Structure ALL") # global structures

plot(NA, xlim=c(0,5), ylim=c(0,5), bty='n',
     xaxt='n', yaxt='n', xlab='', ylab='')
text(1,4,a, pos=4)
text(1,3,b, pos=4)
text(1,2,c, pos=4)
text(1,1,d, pos=4)
points(rep(1,4),1:4, pch=15)

plot(randtest[[2]], main="Local Structure ALL") # global structures

plot(NA, xlim=c(0,5), ylim=c(0,5), bty='n',
     xaxt='n', yaxt='n', xlab='', ylab='')
text(1,4,e, pos=4)
text(1,3,f, pos=4)
text(1,2,g, pos=4)
text(1,1,h, pos=4)
points(rep(1,4),1:4, pch=15)

# dev.off()

sPCA multi-plot

# pdf(file=paste0(title,"_",stratum,"_sPCA_plots.pdf"))
plot(mySpca, useLag=TRUE)
## Warning in validityMethod(object): @tab does not contain integers; as of
## adegenet_2.0-0, numeric values are no longer used

## Warning in validityMethod(object): @tab does not contain integers; as of
## adegenet_2.0-0, numeric values are no longer used
## Warning: This function is now deprecated. Please use the 'multispati'
## function in the 'adespatial' package.

# dev.off()

interpolate sPCA to identify clines

library(akima)

# pdf(file=paste0(title,"_",stratum,"_sPCA_interpolate.pdf"))

# convert longitude to 360° in "other" object
other$Longitude <- ifelse(other$Longitude < 0, 360 + other$Longitude, other$Longitude)
x <- other(obj.s)$xy[,1]
y <- other(obj.s)$xy[,2]

interpX <- seq(min(x),max(x),le=200)
interpY <- seq(min(y),max(y),le=200)
temp <- akima::interp(x, y, mySpca$ls[,1], xo=interpX, yo=interpY, duplicate = "mean") #interpolates duplicate location data points as the mean.
image(temp, col=azur(100))
points(x,y)

myPal <- colorRampPalette(c("firebrick2", "white", "lightslateblue"))
annot <- function(){
title("sPCA - interpolated map of individual scores")
points(x,y)
}
filled.contour(temp, color.pal=myPal, nlev=50,
key.title=title("lagged \nscore 1"), plot.title=annot(), add.plot=TRUE)

# dev.off()

Which alleles exhibit structure (squared loading)

# pdf(file=paste0(title,"_",stratum,"sPCA_allele_contributions.pdf"), width = 10, height = 5, paper = "USr")
myLoadings <- mySpca$c1[,1]^2
names(myLoadings) <- rownames(mySpca$c1)
loadingplot(myLoadings, xlab="Alleles",
ylab="Weight of the alleles",
main="Contribution of alleles \n to the first sPCA axis")

# AVERAGE CONTRIBUTION OF EACH MARKER, BOXPLOT

boxplot(myLoadings~obj.s$loc.fac, las=3, ylab="Contribution", xlab="Marker",
main="Contributions by markers \nto the first global score", col="grey")

# dev.off()
# threshold value above which alleles are annotated.

********************************

**** sPCA NON-SPATIAL PLOTS ****

********************************

# pdf(paste0("SPCA.ax1-2_", stratum,".pdf"), width=6, height=6)
s.class(mySpca$ls, pop(obj.s), xax = 1, yax = 2, grid=FALSE, sub = paste0("SPCA: ", stratum, " ax1-ax2"), possub = "topright")
add.scatter.eig(mySpca$eig, 2,1,2, posi="topleft")

# dev.off()

# pdf(paste0("SPCA.ax1-3_", stratum,".pdf"), width=6, height=6)
s.class(mySpca$ls, pop(obj.s), xax = 1, yax = 3, grid=FALSE, sub = paste0("SPCA: ", stratum, " ax1-ax3"), possub = "topright")
add.scatter.eig(mySpca$eig, 2,1,3, posi="topleft")

# dev.off()

# pdf(paste0("SPCA.ax2-3_", stratum,".pdf"), width=6, height=6)
s.class(mySpca$ls, pop(obj.s), xax = 2, yax = 3, grid=FALSE, sub = paste0("SPCA: ", stratum, " ax2-ax3"), possub = "topright")
add.scatter.eig(mySpca$eig, 2,2,3, posi="topleft")

# dev.off()

3D PC plots (non-spatial)

# Using scatterplot3d
library(scatterplot3d)

# here each population get's it's own color (based on 8 populations)

levels(obj.s@pop) # use this to list the populations, then assign colors to each
##  [1] "23_BC"                "24_W_Vancouver_Is"    "25_Strait_of_Georgia"
##  [4] "26_San_Juan_Is"       "27_Puget_Sound"       "28_Neah_Bay"         
##  [7] "29_Spike_Rock"        "30_ORWA_Coast"        "31_NoCal_OR"         
## [10] "32_NoCal_OR"          "33_SF_RussianRiver"   "34_Monterey_Bay"     
## [13] "35_SoCal"
obj.s@other$pop<-obj.s@pop
obj.s@other$popcol<-obj.s@other$pop

levels(obj.s@other$popcol)[1] <- "red"
levels(obj.s@other$popcol)[2] <- "darkorange1"
levels(obj.s@other$popcol)[3] <- "yellow"
levels(obj.s@other$popcol)[4] <- "green"
levels(obj.s@other$popcol)[5] <- "blue"
levels(obj.s@other$popcol)[6] <- "darkolivegreen"
levels(obj.s@other$popcol)[7] <- "skyblue"
levels(obj.s@other$popcol)[8] <- "magenta"
levels(obj.s@other$popcol)[9] <- "mediumturquoise"
levels(obj.s@other$popcol)[10] <- "peachpuff"
levels(obj.s@other$popcol)[11] <- "gray30"
levels(obj.s@other$popcol)[12] <- "mediumorchid"
levels(obj.s@other$popcol)[13] <- "royalblue"

obj.s@other$popcol<-as.character(obj.s@other$popcol)
  
# pdf(paste0(title,"_",stratum,"3D_plot.pdf"), width=6, height=6)
PpALL.3d <- scatterplot3d(mySpca$ls[,1], mySpca$ls[,2], mySpca$ls[,3], color=obj.s@other$popcol, pch=19, xlab="Axis 1", ylab="Axis 2", zlab="Axis 3", type="h", angle=60, box=FALSE)

# dev.off()

plot individual PC’s

# pdf(file=paste0(title,"_",stratum,"_PC1-3_plots.pdf"))

# display the two rst components of the analysis. Kernel density estimation (s.kde2d) is used for a better assessment of the distribution of the genotypes onto the principal axes:
s.label(mySpca$li, clabel = 0.5)
s.kde2d(mySpca$li, add.p=TRUE, cpoint=0)
add.scatter.eig(mySpca$eig,2,1,2, ratio = .35)

# graphical representation of first 2 PC's (legend location is hard-coded)
s.value(cbind(1:11,rep(1,11)), -5:5, cleg=0)
text(1:11,rep(1,11), -5:5, col="red",cex=1.5)

xy <- obj.s@other$xy
# PC1
#plot(xy)
sample2.map(data3_Lon360$Latitude, data3_Lon360$Lon360, lat.range, lon.range, n = n, 
           bg = "black", col = "black", pt.cex = 0.5)
s.value(obj.s@other$xy, mySpca$ls[,1], add.p=TRUE, csize=1.5)
title("sPCA - 1st PC",col.main="blue" ,line=1, cex.main=1)

# PC2
#plot(xy)
sample2.map(data3_Lon360$Latitude, data3_Lon360$Lon360, lat.range, lon.range, n = n, 
           bg = "black", col = "black", pt.cex = 0.5)
s.value(obj.s@other$xy, mySpca$ls[,2], add.p=TRUE, csize=1.5, csub = 10)
title("sPCA - 2nd PC",col.main="blue" ,line=1, cex.main=1)

# PC3
#plot(xy)
sample2.map(data3_Lon360$Latitude, data3_Lon360$Lon360, lat.range, lon.range, n = n, 
           bg = "black", col = "black", pt.cex = 0.5)
s.value(obj.s@other$xy, mySpca$ls[,3], add.p=TRUE, csize=1.5, csub = 10)
title("sPCA - 3rd PC",col.main="blue" ,line=1, cex.main=1)

# PC4
#plot(xy)
#sample2.map(data3_Lon360$Latitude, data3_Lon360$Lon360, lat.range, lon.range, n = n, 
#           bg = "black", col = "black", pt.cex = 0.5)
#s.value(obj.s@other$xy, mySpca$ls[,4], add.p=TRUE, csize=0.5, csub = 10)
#title("sPCA - 4th PC",col.main="blue" ,line=1, cex.main=1)


# color plot of PC1-3
#plot(xy)
sample2.map(data3_Lon360$Latitude, data3_Lon360$Lon360, lat.range, lon.range, n = n, 
           bg = "black", col = "black", pt.cex = 0.5)
colorplot(obj.s$other$xy, mySpca$ls, axes=1:3, transp=FALSE, add=TRUE,
cex=1.5) # axes=1:ncol(mySpca$li)
title("sPCA - colorplot of PC 1 - 3\n(lagged scores)", col.main="blue",
line=1, cex=1)

# axes = up to 3 PC's to be used (can specify which ones; default = first 3 if not specified)


# dev.off()

Save data

save.image(file=paste0(title, "_", stratum, "_sPCA.Rdata"))